package com.itheima.util;

import org.apache.commons.beanutils.BeanUtils;

import java.lang.reflect.InvocationTargetException;

public class MyBeanUtils {
    public static void populate(java.lang.Object bean, java.util.Map<java.lang.String,? extends java.lang.Object> properties){
        try {
            BeanUtils.populate(bean,properties);
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }

    }
}
